import * as React from 'react';
import { expressions } from '../../common';
import './index.module.scss';
const { memo } = React;

interface BottomProps {
  identity: number;
  toSend: (content: string, identity: number, type: number) => void;
}

function Bottom(props: BottomProps) {
  const { toSend, identity } = props;
  // 发送消息给会员或客服
  return (
    <div className="expressionShow">
      <div className="face">
        <ul>
          {expressions.map((item) => {
            return (
              <li key={item.title}>
                <img
                  className="customerSendExpression"
                  src={item.image}
                  title={item.title}
                  onClick={() => toSend(item.image, identity, 2)}
                />
              </li>
            );
          })}
        </ul>
      </div>
    </div>
  );
}

export default memo(Bottom);
